﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Himall.Entity.Config
{
   public class InviteRecordInfoConfig : EntityTypeConfiguration<InviteRecordInfo>
    {
        public InviteRecordInfoConfig()
        {
            ToTable("Himall_InviteRecord");
            Property(item => item.RegName).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.UserName).HasColumnType("varchar").HasMaxLength(100);
            HasRequired(x => x.InviteMember).WithMany(x => x.InviteMemberRecord).HasForeignKey(x => x.UserId);
            HasRequired(x => x.RegMember).WithMany(x => x.RegMemberRecord).HasForeignKey(x => x.RegUserId);
        }
    }
}
